package com.csstu.tomcat.http;

import lombok.Getter;

import java.io.OutputStream;

/**
 * @program: cstomcat
 * @description: 封装http响应，封装outputStream（是和socket关联）
 * @author: 程硕
 * @create: 2025-08-16 18:17
 **/
@Getter
public class CsResponse {
    private OutputStream outputStream = null;

    //http响应头
    public final static String responseHead = "HTTP/1.1 200 OK\r\n" +
            "Content-Type: text/html;charset=utf-8\r\n" +
            "\r\n";
    //todo 编写setContentType

    //传入的outputStream 是个浏览器的socket绑定的
    public CsResponse(OutputStream outputStream) {
        this.outputStream = outputStream;
    }
}
